<?php include_stylesheets_for_form($form) ?>
<?php include_javascripts_for_form($form) ?>
<?php use_javascript('jquery-1.3.2.min.js') ?> 
<?php use_javascript('valida.form.js') ?> 

<form action="<?php echo url_for('orgao_externo/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?cd_orgao_externo='.$form->getObject()->getCdOrgaoExterno() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<?php if (!$form->getObject()->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<?php endif; ?>
  <table>
    <tfoot>
      <tr>
        <td colspan="2">
          <input type="button" value="Salvar" class="btn" id="btn_salvar" />
          <?php if (!$form->getObject()->isNew()): ?>
            &nbsp;<?php echo link_to('Excluir', 'orgao_externo/delete?cd_orgao_externo='.$form->getObject()->getCdOrgaoExterno(), array('method' => 'delete', 'confirm' => 'Confirma exclusão?', 'class' => 'link_btn')) ?>
          <?php endif; ?>
        </td>
      </tr>
    </tfoot>
    <tbody>
      <?php echo $form ?>
    </tbody>
  </table>
</form>